import { CommonEntity } from '../../../dto/common.entity';
import { Column, Entity } from 'typeorm';

@Entity('cardRecord')
export class CardRecord extends CommonEntity {
  @Column({
    comment: '开始时间',
    nullable: true,
    type: 'timestamp',
  })
  startTime: string;

  @Column({
    comment: '结束时间',
    nullable: true,
    type: 'datetime',
  })
  endTime: string;

  @Column({
    comment: '剩余次数',
    nullable: true,
  })
  residueTime: number;

  @Column({
    comment: '包含商家消费卡',
    length: 9999,
  })
  card: string;

  @Column({
    comment: '所属用户',
  })
  studentId: string;

  @Column({
    comment: '所属门店',
  })
  orgId: string;

  @Column({
    comment: '所属课程',
  })
  courseId: string;

  @Column({
    comment: '所属商品',
  })
  productId: string;
}
